Maximum allowed block size for BDPCM mode

ABSTRACT

A device for decoding video data can be configured to receive a syntax element indicating a maximum block size for a transform skip mode; determine a maximum block size for a block-based delta pulse code modulation (BDPCM) mode based on the syntax element; and decode block of video data based on the determined maximum block size for the BDPCM mode.

This Application claims the benefit of U.S. Provisional PatentApplication 62/863,734, filed 19 Jun. 2019, the entire content of whichis incorporated herein by reference.

TECHNICAL FIELD

This disclosure relates to video encoding and video decoding.

BACKGROUND

Digital video capabilities can be incorporated into a wide range ofdevices, including digital televisions, digital direct broadcastsystems, wireless broadcast systems, personal digital assistants (PDAs),laptop or desktop computers, tablet computers, e-book readers, digitalcameras, digital recording devices, digital media players, video gamingdevices, video game consoles, cellular or satellite radio telephones,so-called “smart phones,” video teleconferencing devices, videostreaming devices, and the like. Digital video devices implement videocoding techniques, such as those described in the standards defined byMPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4, Part 10, Advanced VideoCoding (AVC), ITU-T H.265/High Efficiency Video Coding (HEVC), andextensions of such standards. The video devices may transmit, receive,encode, decode, and/or store digital video information more efficientlyby implementing such video coding techniques.

Video coding techniques include spatial (intra-picture) predictionand/or temporal (inter-picture) prediction to reduce or removeredundancy inherent in video sequences. For block-based video coding, avideo slice (e.g., a video picture or a portion of a video picture) maybe partitioned into video blocks, which may also be referred to ascoding tree units (CTUs), coding units (CUs) and/or coding nodes. Videoblocks in an intra-coded (I) slice of a picture are encoded usingspatial prediction with respect to reference samples in neighboringblocks in the same picture. Video blocks in an inter-coded (P or B)slice of a picture may use spatial prediction with respect to referencesamples in neighboring blocks in the same picture or temporal predictionwith respect to reference samples in other reference pictures. Picturesmay be referred to as frames, and reference pictures may be referred toas reference frames.

SUMMARY

This disclosure describes techniques related to block-based delta pulsecode modulation (BDPCM) mode, residual BDPCM mode, and transform skipmode. More specifically, this disclosure describes techniques that maybe used to align the maximum block size used for BDPCM mode and residualBDPCM mode with the maximum block size used for transform skip mode bydetermining a maximum block size for BDPCM or residual BDPCM mode basedon the maximum block size used for the transform skip mode. By aligningthe maximum block size used for BDPCM mode and residual BDPCM mode withthe maximum block size used for transform skip mode in this manner, thetechniques of this disclosure may simplify aspects of BDPCM mode andresidual BDPCM mode signaling and may prevent non-conforming bitstreams.

According to one example, a method of decoding video data includesreceiving a syntax element indicating a maximum block size for atransform skip mode; determining a maximum block size for a BDPCM modebased on the syntax element; and decoding a block of video data based onthe determined maximum block size for the BDPCM mode.

According to another example, a method of encoding video data includesdetermining a maximum block size used for a transform skip mode;determining a maximum block size for a BDPCM mode based on the maximumblock size used for the transform skip mode; and encoding a block ofvideo data based on the determined maximum block size for the BDPCMmode.

According to another example, a device for decoding video data includesa memory configured to store video data and one or more processorsconfigured to receive a syntax element indicating a maximum block sizefor a transform skip mode; determine a maximum block size for a BDPCMmode based on the syntax element; and decode a block of video data basedon the determined maximum block size for the BDPCM mode.

According to another example, a device for encoding video data includesa memory configured to store video data and one or more processorsconfigured to determine a maximum block size used for a transform skipmode; determine a maximum block size for a BDPCM mode based on themaximum block size used for the transform skip mode; and encode a blockof video data based on the determined maximum block size for the BDPCMmode.

According to another example, a computer-readable storage medium storesinstructions that when executed by one or more processors cause the oneor more processor to receive a syntax element indicating a maximum blocksize for a transform skip mode; determine a maximum block size for aBDPCM mode based on the syntax element; and decode a block of video databased on the determined maximum block size for the BDPCM mode.

According to another example, a computer-readable storage medium storesinstructions that when executed by one or more processors cause the oneor more processor to determine a maximum block size used for a transformskip mode; determine a maximum block size for a BDPCM mode based on themaximum block size used for the transform skip mode; and encode a blockof video data based on the determined maximum block size for the BDPCMmode.

According to another example, an apparatus for decoding video dataincludes means for receiving a syntax element indicating a maximum blocksize for a transform skip mode; means for determining a maximum blocksize for a BDPCM mode based on the syntax element; and means fordecoding a block of video data based on the determined maximum blocksize for the BDPCM mode.

According to another example, an apparatus for encoding video dataincludes means for determining a maximum block size used for a transformskip mode; means for determining a maximum block size for a BDPCM modebased on the maximum block size used for the transform skip mode; andmeans for encoding a block of video data based on the determined maximumblock size for the BDPCM mode.

The details of one or more examples are set forth in the accompanyingdrawings and the description below. Other features, objects, andadvantages will be apparent from the description, drawings, and claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system that may perform the techniques of this disclosure.

FIGS. 2A and 2B are conceptual diagrams illustrating an example quadtreebinary tree (QTBT) structure, and a corresponding coding tree unit(CTU).

FIG. 3 is a block diagram illustrating an example video encoder that mayperform the techniques of this disclosure.

FIG. 4 is a block diagram illustrating an example video decoder that mayperform the techniques of this disclosure.

FIG. 5 is a flowchart illustrating an example process performed by avideo encoder.

FIG. 6 is a flowchart illustrating an example process performed by avideo decoder.

FIG. 7 is a flowchart illustrating an example process performed by avideo encoder, in accordance with one or more techniques of thisdisclosure.

FIG. 8 is a flowchart illustrating an example process performed by avideo decoder, in accordance with one or more techniques of thisdisclosure.

DETAILED DESCRIPTION

Video coding (e.g., video encoding and/or video decoding) typicallyinvolves predicting a block of video data from either an already codedblock of video data in the same picture (e.g., intra prediction) or analready coded block of video data in a different picture (e.g., interprediction). Examples of intra prediction modes include variousdirectional modes, as well as planar mode and DC mode. Block-based deltapulse code modulation (BDPCM) mode and residual domain BDPCM (RDPCM)mode, described in more detail below, are also types of intra predictionmodes. In some instances, the video encoder also calculates residualdata by comparing the prediction block to the original block. Thus, theresidual data represents a difference between the prediction block andthe original block. To reduce the number of bits needed to signal theresidual data, the video encoder may transform and quantize the residualdata and signal the transformed and quantized residual data in theencoded bitstream.

A video decoder decodes and adds the residual data to the predictionblock to produce a reconstructed video block that matches the originalvideo block more closely than the prediction block alone. Thecompression achieved by the transform and quantization processes may belossy, meaning that the transform and quantization processes mayintroduce distortion into the decoded video data. Due to the lossintroduced by the transforming and quantizing of the residual data, thefirst reconstructed block may have distortion or artifacts. One commontype of artifact or distortion is referred to as blockiness, where theboundaries of the blocks used to code the video data are visible.

To further improve the quality of decoded video, a video decoder canperform one or more filtering operations on the reconstructed videoblocks. Examples of these filtering operations include deblockingfiltering, sample adaptive offset (SAO) filtering, and adaptive loopfiltering (ALF). Parameters for these filtering operations may either bedetermined by a video encoder and explicitly signaled in the encodedvideo bitstream or may be implicitly determined by a video decoderwithout needing the parameters to be explicitly signaled in the encodedvideo bitstream.

In some coding scenarios, a video encoder may encode a block of videodata in a transform skip mode in which the transform process describedabove is not performed, i.e., the transform process is skipped. BDPCMmode and residual BDPCM mode are both examples of modes that utilizetransform skipping, although transform skipping may also be used forother modes and other coding scenarios. For a block encoded in atransform skip mode, the residual data is not transformed but may stillbe quantized. Thus, a transform skip coefficient generally correspondsto a quantized representation of a residual value, whereas a transformcoefficient generally corresponds to a residual value of a block thathas been both quantized and transformed to generate a transformcoefficient. As used in this disclosure, the term coefficients may referto either a transform coefficient or a transform skip coefficient andmay be either quantized or unquantized.

This disclosure describes techniques related to BDPCM mode, residualBDPCM mode, and transform skip mode. More specifically, this disclosuredescribes techniques that may be used to align the maximum block sizeused for BDPCM mode and residual BDPCM mode with the maximum block sizeused for transform skip mode by determining a maximum block size forBDPCM or residual BDPCM mode based on the maximum block size used forthe transform skip mode. By aligning the maximum block size used forBDPCM mode and residual BDPCM mode with the maximum block size used fortransform skip mode in this manner, the techniques of this disclosuremay simplify aspects of BDPCM mode and residual BDPCM mode signaling andmay prevent non-conforming bitstreams.

This disclosure may use the term delta pulse code modulation (DPCM) modeto generically refer to either a BDPCM mode or an RDPCM mode. Moreover,the term BDPCM mode may also be considered to include RDPCM mode as onetype of BDPCM mode. Moreover, it should be noted that the acronym RDPCMrefers to any of residual BDPCM, residual domain BDPCM, and quantizedresidual domain BDPCM, which are alternative names that all refer toRDPCM.

The techniques of this disclosure may be applied to any of the existingvideo codecs, such as the High Efficiency Video Coding (HEVC) standard,the Versatile Video Coding (VVC) presently under development, or be anefficient coding tool in a future video coding standard.

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system 100 that may perform the techniques of this disclosure.The techniques of this disclosure are generally directed to coding(encoding and/or decoding) video data. In general, video data includesany data for processing a video. Thus, video data may include raw,unencoded video, encoded video, decoded (e.g., reconstructed) video, andvideo metadata, such as signaling data.

As shown in FIG. 1 , system 100 includes a source device 102 thatprovides encoded video data to be decoded and displayed by a destinationdevice 116, in this example. In particular, source device 102 providesthe video data to destination device 116 via a computer-readable medium110. Source device 102 and destination device 116 may each be any of awide range of devices, including desktop computer, notebook (i.e.,laptop) computer, tablet computer, set-top box, telephone handset suchas a smartphone, television, camera, display device, digital mediaplayer, video gaming console, video streaming device, or the like. Insome cases, source device 102 and destination device 116 may be equippedfor wireless communication, and thus may be referred to as wirelesscommunication devices.

In the example of FIG. 1 , source device 102 includes video source 104,memory 106, video encoder 200, and output interface 108. Destinationdevice 116 includes input interface 122, video decoder 300, memory 120,and display device 118. In accordance with this disclosure, videoencoder 200 of source device 102 and video decoder 300 of destinationdevice 116 may be configured to apply the techniques described in thisdisclosure. Thus, source device 102 represents an example of a videoencoding device, while destination device 116 represents an example of avideo decoding device. In other examples, a source device and adestination device may include other components or arrangements. Forexample, source device 102 may receive video data from an external videosource, such as an external camera. Likewise, destination device 116 mayinterface with an external display device, rather than including anintegrated display device.

System 100 as shown in FIG. 1 is merely one example. In general, anydigital video encoding and/or decoding device may perform techniquesdescribed in this disclosure. Source device 102 and destination device116 are merely examples of such coding devices in which source device102 generates encoded video data for transmission to destination device116. This disclosure refers to a “coding” device as a device thatperforms coding (encoding and/or decoding) of data. Thus, video encoder200 and video decoder 300 represent examples of coding devices, inparticular, a video encoder and a video decoder, respectively. In someexamples, devices 102, 116 may operate in a substantially symmetricalmanner such that each of devices 102, 116 include video encoding anddecoding components. Hence, system 100 may support one-way or two-wayvideo transmission between source device 102 and destination device 116,e.g., for video streaming, video playback, video broadcasting, or videotelephony.

In general, video source 104 represents a source of video data (i.e.,raw, unencoded video data) and provides a sequential series of pictures(also referred to as “frames”) of the video data to video encoder 200,which encodes data for the pictures. Video source 104 of source device102 may include a video capture device, such as a video camera, a videoarchive containing previously captured raw video, and/or a video feedinterface to receive video from a video content provider. As a furtheralternative, video source 104 may generate computer graphics-based dataas the source video, or a combination of live video, archived video, andcomputer-generated video. In each case, video encoder 200 encodes thecaptured, pre-captured, or computer-generated video data. Video encoder200 may rearrange the pictures from the received order (sometimesreferred to as “display order”) into a coding order for coding. Videoencoder 200 may generate a bitstream including encoded video data.Source device 102 may then output the encoded video data via outputinterface 108 onto computer-readable medium 110 for reception and/orretrieval by, e.g., input interface 122 of destination device 116.

Memory 106 of source device 102 and memory 120 of destination device 116represent general purpose memories. In some examples, memories 106, 120may store raw video data, e.g., raw video from video source 104 and raw,decoded video data from video decoder 300. Additionally oralternatively, memories 106, 120 may store software instructionsexecutable by, e.g., video encoder 200 and video decoder 300,respectively. Although shown separately from video encoder 200 and videodecoder 300 in this example, it should be understood that video encoder200 and video decoder 300 may also include internal memories forfunctionally similar or equivalent purposes. Furthermore, memories 106,120 may store encoded video data, e.g., output from video encoder 200and input to video decoder 300. In some examples, portions of memories106, 120 may be allocated as one or more video buffers, e.g., to storeraw, decoded, and/or encoded video data.

Computer-readable medium 110 may represent any type of medium or devicecapable of transporting the encoded video data from source device 102 todestination device 116. In one example, computer-readable medium 110represents a communication medium to enable source device 102 totransmit encoded video data directly to destination device 116 inreal-time, e.g., via a radio frequency network or computer-basednetwork. Output interface 108 may modulate a transmission signalincluding the encoded video data, and input interface 122 may demodulatethe received transmission signal, according to a communication standard,such as a wireless communication protocol. The communication medium maycomprise any wireless or wired communication medium, such as a radiofrequency (RF) spectrum or one or more physical transmission lines. Thecommunication medium may form part of a packet-based network, such as alocal area network, a wide-area network, or a global network such as theInternet. The communication medium may include routers, switches, basestations, or any other equipment that may be useful to facilitatecommunication from source device 102 to destination device 116.

In some examples, source device 102 may output encoded data from outputinterface 108 to storage device 112. Similarly, destination device 116may access encoded data from storage device 112 via input interface 122.Storage device 112 may include any of a variety of distributed orlocally accessed data storage media such as a hard drive, Blu-ray discs,DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, or anyother suitable digital storage media for storing encoded video data.

In some examples, source device 102 may output encoded video data tofile server 114 or another intermediate storage device that may storethe encoded video data generated by source device 102. Destinationdevice 116 may access stored video data from file server 114 viastreaming or download.

File server 114 may be any type of server device capable of storingencoded video data and transmitting that encoded video data to thedestination device 116. File server 114 may represent a web server(e.g., for a website), a server configured to provide a file transferprotocol service (such as File Transfer Protocol (FTP) or File Deliveryover Unidirectional Transport (FLUTE) protocol), a content deliverynetwork (CDN) device, a hypertext transfer protocol (HTTP) server, aMultimedia Broadcast Multicast Service (MBMS) or Enhanced MBMS (eMBMS)server, and/or a network attached storage (NAS) device. File server 114may, additionally or alternatively, implement one or more HTTP streamingprotocols, such as Dynamic Adaptive Streaming over HTTP (DASH), HTTPLive Streaming (HLS), Real Time Streaming Protocol (RTSP), HTTP DynamicStreaming, or the like.

Destination device 116 may access encoded video data from file server114 through any standard data connection, including an Internetconnection. This may include a wireless channel (e.g., a Wi-Ficonnection), a wired connection (e.g., digital subscriber line (DSL),cable modem, etc.), or a combination of both that is suitable foraccessing encoded video data stored on file server 114. Input interface122 may be configured to operate according to any one or more of thevarious protocols discussed above for retrieving or receiving media datafrom file server 114, or other such protocols for retrieving media data.

Output interface 108 and input interface 122 may represent wirelesstransmitters/receivers, modems, wired networking components (e.g.,Ethernet cards), wireless communication components that operateaccording to any of a variety of IEEE 802.11 standards, or otherphysical components. In examples where output interface 108 and inputinterface 122 comprise wireless components, output interface 108 andinput interface 122 may be configured to transfer data, such as encodedvideo data, according to a cellular communication standard, such as 4G,4G-LTE (Long-Term Evolution), LTE Advanced, 5G, or the like. In someexamples where output interface 108 comprises a wireless transmitter,output interface 108 and input interface 122 may be configured totransfer data, such as encoded video data, according to other wirelessstandards, such as an IEEE 802.11 specification, an IEEE 802.15specification (e.g., ZigBee™), a Bluetooth™ standard, or the like. Insome examples, source device 102 and/or destination device 116 mayinclude respective system-on-a-chip (SoC) devices. For example, sourcedevice 102 may include an SoC device to perform the functionalityattributed to video encoder 200 and/or output interface 108, anddestination device 116 may include an SoC device to perform thefunctionality attributed to video decoder 300 and/or input interface122.

The techniques of this disclosure may be applied to video coding insupport of any of a variety of multimedia applications, such asover-the-air television broadcasts, cable television transmissions,satellite television transmissions, Internet streaming videotransmissions, such as dynamic adaptive streaming over HTTP (DASH),digital video that is encoded onto a data storage medium, decoding ofdigital video stored on a data storage medium, or other applications.

Input interface 122 of destination device 116 receives an encoded videobitstream from computer-readable medium 110 (e.g., storage device 112,file server 114, or the like). The encoded video bitstream may includesignaling information defined by video encoder 200, which is also usedby video decoder 300, such as syntax elements having values thatdescribe characteristics and/or processing of video blocks or othercoded units (e.g., slices, pictures, groups of pictures, sequences, orthe like). Display device 118 displays decoded pictures of the decodedvideo data to a user. Display device 118 may represent any of a varietyof display devices such as a cathode ray tube (CRT), a liquid crystaldisplay (LCD), a plasma display, an organic light emitting diode (OLED)display, or another type of display device.

Although not shown in FIG. 1 , in some examples, video encoder 200 andvideo decoder 300 may each be integrated with an audio encoder and/oraudio decoder, and may include appropriate MUX-DEMUX units, or otherhardware and/or software, to handle multiplexed streams including bothaudio and video in a common data stream. If applicable, MUX-DEMUX unitsmay conform to the ITU H.223 multiplexer protocol, or other protocolssuch as the user datagram protocol (UDP).

Video encoder 200 and video decoder 300 each may be implemented as anyof a variety of suitable encoder and/or decoder circuitry, such as oneor more microprocessors, digital signal processors (DSPs), applicationspecific integrated circuits (ASICs), field programmable gate arrays(FPGAs), discrete logic, software, hardware, firmware or anycombinations thereof. When the techniques are implemented partially insoftware, a device may store instructions for the software in asuitable, non-transitory computer-readable medium and execute theinstructions in hardware using one or more processors to perform thetechniques of this disclosure. Each of video encoder 200 and videodecoder 300 may be included in one or more encoders or decoders, eitherof which may be integrated as part of a combined encoder/decoder (CODEC)in a respective device. A device including video encoder 200 and/orvideo decoder 300 may comprise an integrated circuit, a microprocessor,and/or a wireless communication device, such as a cellular telephone.

Video encoder 200 and video decoder 300 may operate according to a videocoding standard. Video coding standards include ITU-T H.261, ISO/IECMPEG-1 Visual, ITU-T H.262 or ISO/IEC MPEG-2 Visual, ITU-T H.263,ISO/IEC MPEG-4 Visual and ITU-T H.264 (also known as ISO/IEC MPEG-4AVC), including its Scalable Video Coding (SVC) and Multi-view VideoCoding (MVC) extensions.

In addition, a new video coding standard, namely High Efficiency VideoCoding (HEVC) or ITU-T H.265, including its range extension, multiviewextension (MV-HEVC) and scalable extension (SHVC), has recently beendeveloped by the Joint Collaboration Team on Video Coding (JCT-VC) aswell as Joint Collaboration Team on 3D Video Coding ExtensionDevelopment (JCT-3V) of ITU-T Video Coding Experts Group (VCEG) andISO/IEC Motion Picture Experts Group (MPEG).

Alternatively or additionally, video encoder 200 and video decoder 300may operate according to other proprietary or industry standards, suchas the Joint Exploration Test Model (JEM) or ITU-T H.266, also referredto as Versatile Video Coding (VVC). A recent draft of the VVC standardis described in Bross, et al. “Versatile Video Coding (Draft 5),” JointVideo Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG11, 14^(th) Meeting: Geneva, CH, 19-27 Mar. 2019, JVET-N1001-v8(hereinafter “VVC Draft 5”). The techniques of this disclosure, however,are not limited to any particular coding standard.

In general, video encoder 200 and video decoder 300 may performblock-based coding of pictures. The term “block” generally refers to astructure including data to be processed (e.g., encoded, decoded, orotherwise used in the encoding and/or decoding process). For example, ablock may include a two-dimensional matrix of samples of luminanceand/or chrominance data. In general, video encoder 200 and video decoder300 may code video data represented in a YUV (e.g., Y, Cb, Cr) format.That is, rather than coding red, green, and blue (RGB) data for samplesof a picture, video encoder 200 and video decoder 300 may code luminanceand chrominance components, where the chrominance components may includeboth red hue and blue hue chrominance components. In some examples,video encoder 200 converts received RGB formatted data to a YUVrepresentation prior to encoding, and video decoder 300 converts the YUVrepresentation to the RGB format. Alternatively, pre- andpost-processing units (not shown) may perform these conversions.

This disclosure may generally refer to coding (e.g., encoding anddecoding) of pictures to include the process of encoding or decodingdata of the picture. Similarly, this disclosure may refer to coding ofblocks of a picture to include the process of encoding or decoding datafor the blocks, e.g., prediction and/or residual coding. An encodedvideo bitstream generally includes a series of values for syntaxelements representative of coding decisions (e.g., coding modes) andpartitioning of pictures into blocks. Thus, references to coding apicture or a block should generally be understood as coding values forsyntax elements forming the picture or block.

HEVC defines various blocks, including coding units (CUs), predictionunits (PUs), and transform units (TUs). According to HEVC, a video coder(such as video encoder 200) partitions a coding tree unit (CTU) into CUsaccording to a quadtree structure. That is, the video coder partitionsCTUs and CUs into four equal, non-overlapping squares, and each node ofthe quadtree has either zero or four child nodes. Nodes without childnodes may be referred to as “leaf nodes,” and CUs of such leaf nodes mayinclude one or more PUs and/or one or more TUs. The video coder mayfurther partition PUs and TUs. For example, in HEVC, a residual quadtree(RQT) represents partitioning of TUs. In HEVC, PUs representinter-prediction data, while TUs represent residual data. CUs that areintra-predicted include intra-prediction information, such as anintra-mode indication.

As another example, video encoder 200 and video decoder 300 may beconfigured to operate according to JEM or VVC. According to JEM or VVC,a video coder (such as video encoder 200) partitions a picture into aplurality of coding tree units (CTUs). Video encoder 200 may partition aCTU according to a tree structure, such as a quadtree-binary tree (QTBT)structure or Multi-Type Tree (MTT) structure. The QTBT structure removesthe concepts of multiple partition types, such as the separation betweenCUs, PUs, and TUs of HEVC. A QTBT structure includes two levels: a firstlevel partitioned according to quadtree partitioning, and a second levelpartitioned according to binary tree partitioning. A root node of theQTBT structure corresponds to a CTU. Leaf nodes of the binary treescorrespond to coding units (CUs).

In an MTT partitioning structure, blocks may be partitioned using aquadtree (QT) partition, a binary tree (BT) partition, and one or moretypes of triple tree (TT) partitions. A triple tree partition is apartition where a block is split into three sub-blocks. In someexamples, a triple tree partition divides a block into three sub-blockswithout dividing the original block through the center. The partitioningtypes in MTT (e.g., QT, BT, and TT), may be symmetrical or asymmetrical.

In some examples, video encoder 200 and video decoder 300 may use asingle QTBT or MTT structure to represent each of the luminance andchrominance components, while in other examples, video encoder 200 andvideo decoder 300 may use two or more QTBT or MTT structures, such asone QTBT/MTT structure for the luminance component and another QTBT/MTTstructure for both chrominance components (or two QTBT/MTT structuresfor respective chrominance components).

Video encoder 200 and video decoder 300 may be configured to usequadtree partitioning per HEVC, QTBT partitioning, MTT partitioning, orother partitioning structures. For purposes of explanation, thedescription of the techniques of this disclosure is presented withrespect to QTBT partitioning. However, it should be understood that thetechniques of this disclosure may also be applied to video codersconfigured to use quadtree partitioning, or other types of partitioningas well.

This disclosure may use “N×N” and “N by N” interchangeably to refer tothe sample dimensions of a block (such as a CU or other video block) interms of vertical and horizontal dimensions, e.g., 16×16 samples or 16by 16 samples. In general, a 16×16 CU will have 16 samples in a verticaldirection (y=16) and 16 samples in a horizontal direction (x=16).Likewise, an N×N CU generally has N samples in a vertical direction andN samples in a horizontal direction, where N represents a nonnegativeinteger value. The samples in a CU may be arranged in rows and columns.Moreover, CUs need not necessarily have the same number of samples inthe horizontal direction as in the vertical direction. For example, CUsmay comprise N×M samples, where M is not necessarily equal to N.

Video encoder 200 encodes video data for CUs representing predictionand/or residual information, and other information. The predictioninformation indicates how the CU is to be predicted in order to form aprediction block for the CU. The residual information generallyrepresents sample-by-sample differences between samples of the CU priorto encoding and the prediction block.

To predict a CU, video encoder 200 may generally form a prediction blockfor the CU through inter-prediction or intra-prediction.Inter-prediction generally refers to predicting the CU from data of apreviously coded picture, whereas intra-prediction generally refers topredicting the CU from previously coded data of the same picture. Toperform inter-prediction, video encoder 200 may generate the predictionblock using one or more motion vectors. Video encoder 200 may generallyperform a motion search to identify a reference block that closelymatches the CU, e.g., in terms of differences between the CU and thereference block. Video encoder 200 may calculate a difference metricusing a sum of absolute difference (SAD), sum of squared differences(SSD), mean absolute difference (MAD), mean squared differences (MSD),or other such difference calculations to determine whether a referenceblock closely matches the current CU. In some examples, video encoder200 may predict the current CU using uni-directional prediction orbi-directional prediction.

Some examples of JEM and VVC also provide an affine motion compensationmode, which may be considered an inter-prediction mode. In affine motioncompensation mode, video encoder 200 may determine two or more motionvectors that represent non-translational motion, such as zoom in or out,rotation, perspective motion, or other irregular motion types.

To perform intra-prediction, video encoder 200 may select anintra-prediction mode to generate the prediction block. Some examples ofJEM and VVC provide sixty-seven intra-prediction modes, includingvarious directional modes, as well as planar mode and DC mode. Ingeneral, video encoder 200 selects an intra-prediction mode thatdescribes neighboring samples to a current block (e.g., a block of a CU)from which to predict samples of the current block. Such samples maygenerally be above, above and to the left, or to the left of the currentblock in the same picture as the current block, assuming video encoder200 codes CTUs and CUs in raster scan order (left to right, top tobottom).

Video encoder 200 encodes data representing the prediction mode for acurrent block. For example, for inter-prediction modes, video encoder200 may encode data representing which of the various availableinter-prediction modes is used, as well as motion information for thecorresponding mode. For uni-directional or bi-directionalinter-prediction, for example, video encoder 200 may encode motionvectors using advanced motion vector prediction (AMVP) or merge mode.Video encoder 200 may use similar modes to encode motion vectors foraffine motion compensation mode.

Following prediction, such as intra-prediction or inter-prediction of ablock, video encoder 200 may calculate residual data for the block. Theresidual data, such as a residual block, represents sample by sampledifferences between the block and a prediction block for the block,formed using the corresponding prediction mode. Video encoder 200 mayapply one or more transforms to the residual block, to producetransformed data in a transform domain instead of the sample domain. Forexample, video encoder 200 may apply a discrete cosine transform (DCT),an integer transform, a wavelet transform, or a conceptually similartransform to residual video data. Additionally, video encoder 200 mayapply a secondary transform following the first transform, such as amode-dependent non-separable secondary transform (MDNSST), a signaldependent transform, a Karhunen-Loeve transform (KLT), or the like.Video encoder 200 produces transform coefficients following applicationof the one or more transforms.

Although the above describes examples where transforms are preformed, insome examples, the transform may be skipped. For instance, video encoder200 may implement transform skip mode in which the transform operationis skipped. In examples where transform is skipped, video encoder 200may output coefficients corresponding to residual values instead oftransform coefficients. The coefficients corresponding to residualvalues may, for example, correspond to quantized residual values. In thefollowing description, the term “coefficient” should be interpreted toinclude either coefficients corresponding to residual values ortransform coefficients generated from the result of a transform.

As noted above, video encoder 200 may perform quantization of thetransform coefficients or, in the case of transform skip, quantizationof the residual values. Quantization generally refers to a process inwhich coefficients are quantized to possibly reduce the amount of dataused to represent the coefficients, providing further compression. Byperforming the quantization process, video encoder 200 may reduce thebit depth associated with some or all of the coefficients. For example,video encoder 200 may round an n-bit value down to an m-bit value duringquantization, where n is greater than m. In some examples, to performquantization, video encoder 200 may perform a bitwise right-shift of thevalue to be quantized.

Following quantization, video encoder 200 may scan the coefficients,producing a one-dimensional vector from the two-dimensional matrixincluding the quantized coefficients. For transform coefficients, thescan may be designed to place higher energy (and therefore lowerfrequency) coefficients at the front of the vector and to place lowerenergy (and therefore higher frequency) transform coefficients at theback of the vector. For transform skip coefficients, the same or adifferent scan may be used. In some examples, video encoder 200 mayutilize a predefined scan order to scan the quantized coefficients toproduce a serialized vector, and then entropy encode the quantizedcoefficients of the vector. In other examples, video encoder 200 mayperform an adaptive scan. After scanning the quantized coefficients toform the one-dimensional vector, video encoder 200 may entropy encodethe one-dimensional vector, e.g., according to context-adaptive binaryarithmetic coding (CABAC). Video encoder 200 may also entropy encodevalues for syntax elements describing metadata associated with theencoded video data for use by video decoder 300 in decoding the videodata.

To perform CABAC, video encoder 200 may assign a context within acontext model to a symbol to be transmitted. The context may relate to,for example, whether neighboring values of the symbol are zero-valued ornot. The probability determination may be based on a context assigned tothe symbol.

Video encoder 200 may further generate syntax data, such as block-basedsyntax data, picture-based syntax data, and sequence-based syntax data,to video decoder 300, e.g., in a picture header, a block header, a sliceheader, or other syntax data, such as a sequence parameter set (SPS),picture parameter set (PPS), or video parameter set (VPS). Video decoder300 may likewise decode such syntax data to determine how to decodecorresponding video data.

In this manner, video encoder 200 may generate a bitstream includingencoded video data, e.g., syntax elements describing partitioning of apicture into blocks (e.g., CUs) and prediction and/or residualinformation for the blocks. Ultimately, video decoder 300 may receivethe bitstream and decode the encoded video data.

In general, video decoder 300 performs a reciprocal process to thatperformed by video encoder 200 to decode the encoded video data of thebitstream. For example, video decoder 300 may decode values for syntaxelements of the bitstream using CABAC in a manner substantially similarto, albeit reciprocal to, the CABAC encoding process of video encoder200. The syntax elements may define partitioning information of apicture into CTUs, and partitioning of each CTU according to acorresponding partition structure, such as a QTBT structure, to defineCUs of the CTU. The syntax elements may further define prediction andresidual information for blocks (e.g., CUs) of video data.

The residual information may be represented, for example, by quantizedtransform coefficients, quantized transform skip coefficients, orunquantized transform skip coefficients. Video decoder 300 may inversequantize and, if coded in a transform mode, inverse transform thequantized coefficients of a block to reproduce a residual block for theblock. Video decoder 300 uses a signaled prediction mode (intra- orinter-prediction) and related prediction information (e.g., motioninformation for inter-prediction) to form a prediction block for theblock. Video decoder 300 may then combine the prediction block and theresidual block (on a sample-by-sample basis) to reproduce the originalblock. Video decoder 300 may perform additional processing, such asperforming a deblocking process to reduce visual artifacts alongboundaries of the block.

As described in greater detail below, video encoder 200 may beconfigured to determine a maximum block size used for a transform skipmode and determine a maximum block size for a BDPCM mode based on themaximum block size used for the transform skip mode. Video encoder 200may generate a syntax element, for inclusion in a sequence parameter setsyntax structure of the video data, indicating the maximum block sizeused for the transform skip mode. Video decoder 300 may be configured toreceive a syntax element indicating a maximum block size for a transformskip mode and determining a maximum block size for a BDPCM mode based onthe syntax element. By aligning the maximum block size used for BDPCMmode and residual BDPCM mode with the maximum block size used fortransform skip mode in this manner, the techniques of this disclosure,as implemented by video encoder 200 and video decoder 300, may simplifyaspects of BDPCM mode and residual BDPCM mode signaling and preventnon-conforming bitstreams.

This disclosure may generally refer to “signaling” certain information,such as syntax elements. The term “signaling” may generally refer to thecommunication of values for syntax elements and/or other data used todecode encoded video data. That is, video encoder 200 may signal valuesfor syntax elements in the bitstream. In general, signaling refers togenerating a value in the bitstream. As noted above, source device 102may transport the bitstream to destination device 116 substantially inreal time, or not in real time, such as might occur when storing syntaxelements to storage device 112 for later retrieval by destination device116.

FIGS. 2A and 2B are conceptual diagram illustrating an example quadtreebinary tree (QTBT) structure 130, and a corresponding coding tree unit(CTU) 132. The solid lines represent quadtree splitting, and dottedlines indicate binary tree splitting. In each split (i.e., non-leaf)node of the binary tree, one flag is signaled to indicate whichsplitting type (i.e., horizontal or vertical) is used, where 0 indicateshorizontal splitting and 1 indicates vertical splitting in this example.For the quadtree splitting, there is no need to indicate the splittingtype, since quadtree nodes split a block horizontally and verticallyinto 4 sub-blocks with equal size. Accordingly, video encoder 200 mayencode, and video decoder 300 may decode, syntax elements (such assplitting information) for a region tree level of QTBT structure 130(i.e., the solid lines) and syntax elements (such as splittinginformation) for a prediction tree level of QTBT structure 130 (i.e.,the dashed lines). Video encoder 200 may encode, and video decoder 300may decode, video data, such as prediction and transform data, for CUsrepresented by terminal leaf nodes of QTBT structure 130.

In general, CTU 132 of FIG. 2B may be associated with parametersdefining sizes of blocks corresponding to nodes of QTBT structure 130 atthe first and second levels. These parameters may include a CTU size(representing a size of CTU 132 in samples), a minimum quadtree size(MinQTSize, representing a minimum allowed quadtree leaf node size), amaximum binary tree size (MaxBTSize, representing a maximum allowedbinary tree root node size), a maximum binary tree depth (MaxBTDepth,representing a maximum allowed binary tree depth), and a minimum binarytree size (MinBTSize, representing the minimum allowed binary tree leafnode size).

The root node of a QTBT structure corresponding to a CTU may have fourchild nodes at the first level of the QTBT structure, each of which maybe partitioned according to quadtree partitioning. That is, nodes of thefirst level are either leaf nodes (having no child nodes) or have fourchild nodes. The example of QTBT structure 130 represents such nodes asincluding the parent node and child nodes having solid lines forbranches. If nodes of the first level are not larger than the maximumallowed binary tree root node size (MaxBTSize), then the nodes can befurther partitioned by respective binary trees. The binary treesplitting of one node can be iterated until the nodes resulting from thesplit reach the minimum allowed binary tree leaf node size (MinBTSize)or the maximum allowed binary tree depth (MaxBTDepth). The example ofQTBT structure 130 represents such nodes as having dashed lines forbranches. The binary tree leaf node is referred to as a coding unit(CU), which is used for prediction (e.g., intra-picture or inter-pictureprediction) and transform, without any further partitioning. Asdiscussed above, CUs may also be referred to as “video blocks” or“blocks.”

In one example of the QTBT partitioning structure, the CTU size is setas 128×128 (luma samples and two corresponding 64×64 chroma samples),the MinQTSize is set as 16×16, the MaxBTSize is set as 64×64, theMinBTSize (for both width and height) is set as 4, and the MaxBTDepth isset as 4. The quadtree partitioning is applied to the CTU first togenerate quad-tree leaf nodes. The quadtree leaf nodes may have a sizefrom 16×16 (i.e., the MinQTSize) to 128×128 (i.e., the CTU size). If thequadtree leaf node is 128×128, it will not be further split by thebinary tree, since the size exceeds the MaxBTSize (i.e., 64×64, in thisexample). Otherwise, the quadtree leaf node will be further partitionedby the binary tree. Therefore, the quadtree leaf node is also the rootnode for the binary tree and has the binary tree depth as 0. When thebinary tree depth reaches MaxBTDepth (4, in this example), no furthersplitting is permitted. The binary tree node having width equal toMinBTSize (4, in this example), implies that no further horizontalsplitting is permitted. Similarly, a binary tree node having a heightequal to MinBTSize implies that no further vertical splitting ispermitted for that binary tree node. As noted above, leaf nodes of thebinary tree are referred to as CUs and are further processed accordingto prediction and transform without further partitioning.

Video encoder 200 and video decoder 300 may be configured to code blocksin a transform skip mode. Transform skip mode skips a transform processfor residual signals before a quantization step on the encoder side andan inverse transform step after the dequantization step on the decoderside. For each transform block, transform skip mode may or may not beapplied. Video decoder 300 can determine whether the transform skip isto be applied to the current block by rules predefined for both encoderand decoder or by parsing information from the bit-stream. In thecurrent VVC design, for some modes, such as residual BDPCM, transformskip is implicitly used, so no flag is needed in the bitstream. Forother modes in which transform-skip may be applied, video encoder 200has the freedom of selecting from a few candidates transforms, includingtransform skip mode. In this case, when a transform block has non-zerocoded block flag (CBF), a flag is needed to indicate whether transformskip mode should be used for the current block. When CBF is zero, thereis no residual information coded for the corresponding transform block.

Video encoder 200 and video decoder 300 may configured to code blocks ina BDPCM mode. BDPCM mode uses reconstructed samples to predict the rowsor columns line by line. That is, video encoder 200 and video decoder300 may, for example, predict a first line of a block, i.e., a first rowor first column of the block, from a reconstructed line in a neighboringblock, as with typical intra prediction. Video encoder 200 and videodecoder 300 may, however, predict the second line of the block based onthe reconstructed samples for the first line, meaning that video encoder200 and video decoder 300 predict the second line of the block based onthe predicted samples for the first line plus residual values for thefirst line. Video encoder 200 and video decoder 300 may then predict thethird row of the block based on reconstructed samples for the secondline, and so on. A signaled BDPCM direction indicates whether a verticalprediction direction or horizontal prediction direction is used. Thereference pixels used are unfiltered samples. The prediction error isquantized in the spatial domain. Pixels are reconstructed by adding thedequantized prediction error to the prediction.

As an additional or alternative scheme to BDPCM, video encoder 200 andvideo decoder 300 may be configured to code video blocks in an RDPCMmode, which is currently included in VVC Draft 5. The signaling andprediction directions used are the same as for BDPCM. In RDPCM, videoencoder 200 and video decoder 300 first intra predict the entire blockby copying samples of a neighboring block according to a predictiondirection (e.g., horizontal or vertical prediction) similar to intraprediction. The residual is quantized, and the difference between thequantized residual and a predictor (horizontal or vertical) quantizedvalue is coded. That is, for a first line of a block, video encoder 200and video decoder 300 receive a residual value representing a differencebetween a predicted sample for the first line and a correspondingoriginal sample. For a second line of the block, however, video encoder200 and video decoder 300 use the residual value for the first line as apredictor for a residual value of the second line. Thus, video encoder200 and video decoder 300 signal the residual for a sample of the secondline as a difference between the residual value for a neighboring samplein the first line and the residual value for the sample in the secondline. Video encoder 200 and video decoder 300 signal the residual for asample of the third line as a difference between the residual value fora neighboring sample in the second line and the residual value for thesample in the third line, and so on.

A benefit of this scheme is that video encoder 200 and video decoder 300may perform the inverse DPCM on the fly during coefficient parsingsimply by adding the predictor as the coefficients are parsed or videodecoder 300 may perform inverse DPCM after parsing. The splitting of 4×Nand N×4 blocks into 2 parallel processed blocks can be eliminated.

Residual domain BDPCM was adopted at the 14^(th) WET meeting. In VVC,the maximum block size for BDPCM/RDPCM is 32×32. BDPCM mode always usesTransform Skip (TS). The maximum size of TS is signaled in a PPS RBSPand is defined as below:

log2_transform_skip_max_size_minus2 specifies the maximum block sizeused for transform skip, and shall be in the range of 0 to 3.

When not present, the value of log2_transform_skip_max_size_minus2 isinferred to be equal to 0.

The variable MaxTsSize is set equal to1<<(log2_transform_skip_max_size_minus2+2).

As BDPCM mode and RDPCM mode always use transform skip, this disclosureproposes techniques for aligning the designs of BDPCM mode and RDPCMmode with the design of transform skip mode.

According to one example technique of this disclosure, the design of theprediction modes which use transform skip may be aligned with thetransform skip (TS) design. As one example, in VVC Draft 5, a maximum TSblock size is signaled in a PPS. According to techniques of thisdisclosure, video encoder 200 and video decoder 300 may be configured toset the maximum block size for BDPCM (or RDPCM) equal to the maximum TSsize, which may be equal to:1<<(log2_transform_skip_max_size_minus2+2)).

Additionally, the presence of an RDPCM mode flag may depend on themaximum allowed TS size. In this example, the maximum TS size can be setas a value signaled from video encoder 200 to video decoder 300 at asequence level, picture level, slice level. For example, this value canbe signaled in an SPS, PPS, or slice header (SH). In some example, theRDPCM mode flag may specify a direction for the RDPCM mode. In otherexamples, the RDPCM mode flag may additionally or alternatively specifywhether RDPCM mode is used for a specific block.

According to another example technique of this disclosure, the maximumblock size for BDPCM (or RDPCM) may be signalled separately from TS. Inone example, the maximum block size for BDPCM or RDPCM may be predefinedby video encoder 200 and video decoder 300 or be set as a value signaledfrom video encoder 200 to video decoder 300 at a sequence level, apicture level, or a slice level. For example, this value can be signaledin an SPS, a PPS, or an SH.

According to another example technique of this disclosure, video encoder200 to video decoder 300 may signal a maximum block size for BDPCM orRDPCM as a difference between the maximum block size for BDPCM or RDPCMand maximum block size for TS. This difference can be represented by thesyntax element log2_diff_max_BDPCM_max_TS. In this example, videoencoder 200 and video decoder 300 may be configured to set the maximumblock size for BDPCM or RDPCM equal to1<<(log2_transform_skip_max_size_minus2+2−log2_diff_max_BDPCM_max_TS).In another example, video encoder 200 may be configured to signal avalue for log2_diff_max_BDPCM_max_TS. In this example, video encoder 200and video decoder 300 may be configured to set the maximum block sizefor BDPCM or RDPCM equal to1<<(log2_transform_skip_max_size_minus2+2+log2_diff_max_BDPCM_max_TS).In another example, video encoder 200 may be configured to signal a signand a value for log2_diff_max_BDPCM_max_TS. In this example, videoencoder 200 and video decoder 300 may be configured to set the maximumsize of BDPCM or RDPCM equal to1<<(log2_transform_skip_max_size_minus2+2+sign*log2_diff_max_BDPCM_max_TS).In another example, video encoder 200 can signal the maximum block sizefor BDPCM or RDPCM to video decoder 300 at a sequence level, a picturelevel, or a slice level. For example, the maximum block size can besignaled in an SPS, a PPS, or an SH.

According to another example technique of this disclosure, thetechniques of this disclosure may be extended to any prediction modethat uses transform skip. Furthermore, the techniques of this disclosuremay also be used to signal a minimum block size instead of or inaddition to a maximum block size.

FIG. 3 is a block diagram illustrating an example video encoder 200 thatmay perform the techniques of this disclosure. FIG. 3 is provided forpurposes of explanation and should not be considered limiting of thetechniques as broadly exemplified and described in this disclosure. Forpurposes of explanation, this disclosure describes video encoder 200 inthe context of video coding standards such as the HEVC video codingstandard and the H.266/VVC video coding standard in development.However, the techniques of this disclosure are not limited to thesevideo coding standards and are applicable generally to video encodingand decoding.

In the example of FIG. 3 , video encoder 200 includes video data memory230, mode selection unit 202, residual generation unit 204, transformprocessing unit 206, quantization unit 208, inverse quantization unit210, inverse transform processing unit 212, reconstruction unit 214,filter unit 216, decoded picture buffer (DPB) 218, and entropy encodingunit 220. Any or all of video data memory 230, mode selection unit 202,residual generation unit 204, transform processing unit 206,quantization unit 208, inverse quantization unit 210, inverse transformprocessing unit 212, reconstruction unit 214, filter unit 216, DPB 218,and entropy encoding unit 220 may be implemented in one or moreprocessors or in processing circuitry. Moreover, video encoder 200 mayinclude additional or alternative processors or processing circuitry toperform these and other functions.

Video data memory 230 may store video data to be encoded by thecomponents of video encoder 200. Video encoder 200 may receive the videodata stored in video data memory 230 from, for example, video source 104(FIG. 1 ). DPB 218 may act as a reference picture memory that storesreference video data for use in prediction of subsequent video data byvideo encoder 200. Video data memory 230 and DPB 218 may be formed byany of a variety of memory devices, such as dynamic random access memory(DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM),resistive RAM (RRAM), or other types of memory devices. Video datamemory 230 and DPB 218 may be provided by the same memory device orseparate memory devices. In various examples, video data memory 230 maybe on-chip with other components of video encoder 200, as illustrated,or off-chip relative to those components.

In this disclosure, reference to video data memory 230 should not beinterpreted as being limited to memory internal to video encoder 200,unless specifically described as such, or memory external to videoencoder 200, unless specifically described as such. Rather, reference tovideo data memory 230 should be understood as reference memory thatstores video data that video encoder 200 receives for encoding (e.g.,video data for a current block that is to be encoded). Memory 106 ofFIG. 1 may also provide temporary storage of outputs from the variousunits of video encoder 200.

The various units of FIG. 3 are illustrated to assist with understandingthe operations performed by video encoder 200. The units may beimplemented as fixed-function circuits, programmable circuits, or acombination thereof. Fixed-function circuits refer to circuits thatprovide particular functionality, and are preset on the operations thatcan be performed. Programmable circuits refer to circuits that can beprogrammed to perform various tasks, and provide flexible functionalityin the operations that can be performed. For instance, programmablecircuits may execute software or firmware that cause the programmablecircuits to operate in the manner defined by instructions of thesoftware or firmware. Fixed-function circuits may execute softwareinstructions (e.g., to receive parameters or output parameters), but thetypes of operations that the fixed-function circuits perform aregenerally immutable. In some examples, the one or more of the units maybe distinct circuit blocks (fixed-function or programmable), and in someexamples, the one or more units may be integrated circuits.

Video encoder 200 may include arithmetic logic units (ALUs), elementaryfunction units (EFUs), digital circuits, analog circuits, and/orprogrammable cores, formed from programmable circuits. In examples wherethe operations of video encoder 200 are performed using softwareexecuted by the programmable circuits, memory 106 (FIG. 1 ) may storethe object code of the software that video encoder 200 receives andexecutes, or another memory within video encoder 200 (not shown) maystore such instructions.

Video data memory 230 is configured to store received video data. Videoencoder 200 may retrieve a picture of the video data from video datamemory 230 and provide the video data to residual generation unit 204and mode selection unit 202. Video data in video data memory 230 may beraw video data that is to be encoded.

Mode selection unit 202 includes a motion estimation unit 222, motioncompensation unit 224, and an intra-prediction unit 226. Mode selectionunit 202 may include additional functional units to perform videoprediction in accordance with other prediction modes. As examples, modeselection unit 202 may include a palette unit, an intra-block copy unit(which may be part of motion estimation unit 222 and/or motioncompensation unit 224), an affine unit, a linear model (LM) unit, or thelike.

Mode selection unit 202 generally coordinates multiple encoding passesto test combinations of encoding parameters and resultingrate-distortion values for such combinations. The encoding parametersmay include partitioning of CTUs into CUs, prediction modes for the CUs,transform types for residual data of the CUs, quantization parametersfor residual data of the CUs, and so on. Mode selection unit 202 mayultimately select the combination of encoding parameters havingrate-distortion values that are better than the other testedcombinations.

Video encoder 200 may partition a picture retrieved from video datamemory 230 into a series of CTUs and encapsulate one or more CTUs withina slice. Mode selection unit 202 may partition a CTU of the picture inaccordance with a tree structure, such as the QTBT structure or thequad-tree structure of HEVC described above. As described above, videoencoder 200 may form one or more CUs by partitioning a CTU according tothe tree structure. Such a CU may also be referred to generally as a“video block” or “block.”

In general, mode selection unit 202 also controls the components thereof(e.g., motion estimation unit 222, motion compensation unit 224, andintra-prediction unit 226) to generate a prediction block for a currentblock (e.g., a current CU, or in HEVC, the overlapping portion of a PUand a TU). For inter-prediction of a current block, motion estimationunit 222 may perform a motion search to identify one or more closelymatching reference blocks in one or more reference pictures (e.g., oneor more previously coded pictures stored in DPB 218). In particular,motion estimation unit 222 may calculate a value representative of howsimilar a potential reference block is to the current block, e.g.,according to sum of absolute difference (SAD), sum of squareddifferences (SSD), mean absolute difference (MAD), mean squareddifferences (MSD), or the like. Motion estimation unit 222 may generallyperform these calculations using sample-by-sample differences betweenthe current block and the reference block being considered. Motionestimation unit 222 may identify a reference block having a lowest valueresulting from these calculations, indicating a reference block thatmost closely matches the current block.

Motion estimation unit 222 may form one or more motion vectors (MVs)that defines the positions of the reference blocks in the referencepictures relative to the position of the current block in a currentpicture. Motion estimation unit 222 may then provide the motion vectorsto motion compensation unit 224. For example, for uni-directionalinter-prediction, motion estimation unit 222 may provide a single motionvector, whereas for bi-directional inter-prediction, motion estimationunit 222 may provide two motion vectors. Motion compensation unit 224may then generate a prediction block using the motion vectors. Forexample, motion compensation unit 224 may retrieve data of the referenceblock using the motion vector. As another example, if the motion vectorhas fractional sample precision, motion compensation unit 224 mayinterpolate values for the prediction block according to one or moreinterpolation filters. Moreover, for bi-directional inter-prediction,motion compensation unit 224 may retrieve data for two reference blocksidentified by respective motion vectors and combine the retrieved data,e.g., through sample-by-sample averaging or weighted averaging.

As another example, for intra-prediction, or intra-prediction coding,intra-prediction unit 226 may generate the prediction block from samplesneighboring the current block. For example, for directional modes,intra-prediction unit 226 may generally mathematically combine values ofneighboring samples and populate these calculated values in the defineddirection across the current block to produce the prediction block. Asanother example, for DC mode, intra-prediction unit 226 may calculate anaverage of the neighboring samples to the current block and generate theprediction block to include this resulting average for each sample ofthe prediction block. As another example, intra-prediction unit 226 may,for example, generate a prediction block using BDPCM and RDPCM asdescribed above.

Mode selection unit 202 provides the prediction block to residualgeneration unit 204. Residual generation unit 204 receives a raw,unencoded version of the current block from video data memory 230 andthe prediction block from mode selection unit 202. Residual generationunit 204 calculates sample-by-sample differences between the currentblock and the prediction block. The resulting sample-by-sampledifferences define a residual block for the current block. In someexamples, residual generation unit 204 may also determine differencesbetween sample values in the residual block to generate a residual blockusing residual differential pulse code modulation (RDPCM). In someexamples, residual generation unit 204 may be formed using one or moresubtractor circuits that perform binary subtraction.

In examples where mode selection unit 202 partitions CUs into PUs, eachPU may be associated with a luma prediction unit and correspondingchroma prediction units. Video encoder 200 and video decoder 300 maysupport PUs having various sizes. As indicated above, the size of a CUmay refer to the size of the luma coding block of the CU and the size ofa PU may refer to the size of a luma prediction unit of the PU. Assumingthat the size of a particular CU is 2N×2N, video encoder 200 may supportPU sizes of 2N×2N or N×N for intra prediction, and symmetric PU sizes of2N×2N, 2N×N, N×2N, N×N, or similar for inter prediction. Video encoder200 and video decoder 300 may also support asymmetric partitioning forPU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter prediction.

In examples where mode selection unit does not further partition a CUinto PUs, each CU may be associated with a luma coding block andcorresponding chroma coding blocks. As above, the size of a CU may referto the size of the luma coding block of the CU. The video encoder 200and video decoder 300 may support CU sizes of 2N×2N, 2N×N, or N×2N.

For other video coding techniques such as an intra-block copy modecoding, an affine-mode coding, and linear model (LM) mode coding, as fewexamples, mode selection unit 202, via respective units associated withthe coding techniques, generates a prediction block for the currentblock being encoded. In some examples, such as palette mode coding, modeselection unit 202 may not generate a prediction block, and insteadgenerate syntax elements that indicate the manner in which toreconstruct the block based on a selected palette. In such modes, modeselection unit 202 may provide these syntax elements to entropy encodingunit 220 to be encoded.

As described above, residual generation unit 204 receives the video datafor the current block and the corresponding prediction block. Residualgeneration unit 204 then generates a residual block for the currentblock. To generate the residual block, residual generation unit 204calculates sample-by-sample differences between the prediction block andthe current block.

Transform processing unit 206 may apply one or more transforms to theresidual block to generate a block of transform coefficients (referredto herein as a “transform coefficient block”). Transform processing unit206 may apply various transforms to a residual block to form thetransform coefficient block. For example, transform processing unit 206may apply a discrete cosine transform (DCT), a directional transform, aKarhunen-Loeve transform (KLT), or a conceptually similar transform to aresidual block. In some examples, transform processing unit 206 mayperform multiple transforms to a residual block, e.g., a primarytransform and a secondary transform, such as a rotational transform. Insome examples, transform processing unit 206 does not apply transformsto a residual block. In other words, the residual block is coded using atransform skip mode. For a block of video data coded in the transformskip mode, transform processing unit 206 may be viewed as a pass-throughunit that does not alter the residual block. However, this disclosurerefers to elements in a transform skip block as “coefficients” insteadof residual values after passing through transform processing unit 206.

Quantization unit 208 may quantize the coefficients in a coefficientblock to produce a quantized coefficient block. Quantization unit 208may quantize coefficients of a coefficient block according to aquantization parameter (QP) value associated with the current block.Video encoder 200 (e.g., via mode selection unit 202) may adjust thedegree of quantization applied to the coefficient blocks associated withthe current block by adjusting the QP value associated with the CU.Quantization may introduce loss of information, and thus, quantizedcoefficients may have lower precision than the original coefficients.

Inverse quantization unit 210 and inverse transform processing unit 212may apply inverse quantization and inverse transforms to a quantizedcoefficient block, respectively, to reconstruct a residual block fromthe coefficient block. For a block of video data coded in a transformskip mode, inverse transform processing unit 212 may be viewed as apass-through unit that does not alter the dequantized coefficient block.Reconstruction unit 214 may produce a reconstructed block correspondingto the current block (albeit potentially with some degree of distortion)based on the reconstructed residual block and a prediction blockgenerated by mode selection unit 202. For example, reconstruction unit214 may add samples of the reconstructed residual block to correspondingsamples from the prediction block generated by mode selection unit 202to produce the reconstructed block.

Filter unit 216 may perform one or more filter operations onreconstructed blocks. For example, filter unit 216 may performdeblocking operations to reduce blockiness artifacts along edges of CUs.Operations of filter unit 216 may be skipped, in some examples.

Video encoder 200 stores reconstructed blocks in DPB 218. For instance,in examples where operations of filter unit 216 are not performed,reconstruction unit 214 may store reconstructed blocks to DPB 218. Inexamples where operations of filter unit 216 are performed, filter unit216 may store the filtered reconstructed blocks to DPB 218. Motionestimation unit 222 and motion compensation unit 224 may retrieve areference picture from DPB 218, formed from the reconstructed (andpotentially filtered) blocks, to inter-predict blocks of subsequentlyencoded pictures. In addition, intra-prediction unit 226 may usereconstructed blocks in DPB 218 of a current picture to intra-predictother blocks in the current picture.

In general, entropy encoding unit 220 may entropy encode syntax elementsreceived from other functional components of video encoder 200. Forexample, entropy encoding unit 220 may entropy encode quantizedcoefficient blocks from quantization unit 208. As another example,entropy encoding unit 220 may entropy encode prediction syntax elements(e.g., motion information for inter-prediction or intra-mode informationfor intra-prediction) from mode selection unit 202. Entropy encodingunit 220 may perform one or more entropy encoding operations on thesyntax elements, which are another example of video data, to generateentropy-encoded data. For example, entropy encoding unit 220 may performa context-adaptive variable length coding (CAVLC) operation, a CABACoperation, a variable-to-variable (V2V) length coding operation, asyntax-based context-adaptive binary arithmetic coding (SBAC) operation,a Probability Interval Partitioning Entropy (PIPE) coding operation, anExponential-Golomb encoding operation, or another type of entropyencoding operation on the data. In some examples, entropy encoding unit220 may operate in bypass mode where syntax elements are not contextencoded.

Video encoder 200 may output a bitstream that includes the entropyencoded syntax elements needed to reconstruct blocks of a slice orpicture. In particular, entropy encoding unit 220 may output thebitstream.

The operations described above are described with respect to a block.Such description should be understood as being operations for a lumacoding block and/or chroma coding blocks. As described above, in someexamples, the luma coding block and chroma coding blocks are luma andchroma components of a CU. In some examples, the luma coding block andthe chroma coding blocks are luma and chroma components of a PU.

In some examples, operations performed with respect to a luma codingblock need not be repeated for the chroma coding blocks. As one example,operations to identify a motion vector (MV) and a reference picture fora luma coding block need not be repeated for identifying a MV andreference picture for the chroma blocks. Rather, the MV for the lumacoding block may be scaled to determine the MV for the chroma blocks,and the reference picture may be the same. As another example, theintra-prediction process may be the same for the luma coding block andthe chroma coding blocks.

Video encoder 200 represents an example of a device configured to encodevideo data including a memory configured to store video data, and one ormore processing units implemented in circuitry and configured todetermine a maximum block size used for transform skip and determine amaximum size for a BDPCM or RDPCM mode based on the maximum block sizeused for transform skip. In other examples, video encoder 200 mayseparately determine a maximum size for a BDPCM or RDPCM mode based onthe second syntax element or use a maximum size for a BDPCM or RDPCMmode defined in a CODEC being executed by video encoder 200.

FIG. 4 is a block diagram illustrating an example video decoder 300 thatmay perform the techniques of this disclosure. FIG. 4 is provided forpurposes of explanation and is not limiting on the techniques as broadlyexemplified and described in this disclosure. For purposes ofexplanation, this disclosure describes video decoder 300 according tothe techniques of JEM, VVC, and HEVC. However, the techniques of thisdisclosure may be performed by video coding devices that are configuredto other video coding standards.

In the example of FIG. 4 , video decoder 300 includes coded picturebuffer (CPB) memory 320, entropy decoding unit 302, predictionprocessing unit 304, inverse quantization unit 306, inverse transformprocessing unit 308, reconstruction unit 310, filter unit 312, anddecoded picture buffer (DPB) 314. Any or all of CPB memory 320, entropydecoding unit 302, prediction processing unit 304, inverse quantizationunit 306, inverse transform processing unit 308, reconstruction unit310, filter unit 312, and DPB 314 may be implemented in one or moreprocessors or in processing circuitry. Moreover, video decoder 300 mayinclude additional or alternative processors or processing circuitry toperform these and other functions.

Prediction processing unit 304 includes motion compensation unit 316 andintra-prediction unit 318. Prediction processing unit 304 may includeaddition units to perform prediction in accordance with other predictionmodes. As examples, prediction processing unit 304 may include a paletteunit, an intra-block copy unit (which may form part of motioncompensation unit 316), an affine unit, a linear model (LM) unit, or thelike. In other examples, video decoder 300 may include more, fewer, ordifferent functional components.

CPB memory 320 may store video data, such as an encoded video bitstream,to be decoded by the components of video decoder 300. The video datastored in CPB memory 320 may be obtained, for example, fromcomputer-readable medium 110 (FIG. 1 ). CPB memory 320 may include a CPBthat stores encoded video data (e.g., syntax elements) from an encodedvideo bitstream. Also, CPB memory 320 may store video data other thansyntax elements of a coded picture, such as temporary data representingoutputs from the various units of video decoder 300. DPB 314 generallystores decoded pictures, which video decoder 300 may output and/or useas reference video data when decoding subsequent data or pictures of theencoded video bitstream. CPB memory 320 and DPB 314 may be formed by anyof a variety of memory devices, such as DRAM, including SDRAM, MRAM,RRAM, or other types of memory devices. CPB memory 320 and DPB 314 maybe provided by the same memory device or separate memory devices. Invarious examples, CPB memory 320 may be on-chip with other components ofvideo decoder 300, or off-chip relative to those components.

Additionally or alternatively, in some examples, video decoder 300 mayretrieve coded video data from memory 120 (FIG. 1 . Memory 120 mayadditionally or alternatively store instructions to be executed by videodecoder 300, when some or all of the functionality of video decoder 300is implemented in software to be executed by processing circuitry ofvideo decoder 300.

The various units shown in FIG. 4 are illustrated to assist withunderstanding the operations performed by video decoder 300. The unitsmay be implemented as fixed-function circuits, programmable circuits, ora combination thereof. Similar to FIG. 3 , fixed-function circuits referto circuits that provide particular functionality, and are preset on theoperations that can be performed. Programmable circuits refer tocircuits that can be programmed to perform various tasks, and provideflexible functionality in the operations that can be performed. Forinstance, programmable circuits may execute software or firmware thatcause the programmable circuits to operate in the manner defined byinstructions of the software or firmware. Fixed-function circuits mayexecute software instructions (e.g., to receive parameters or outputparameters), but the types of operations that the fixed-functioncircuits perform are generally immutable. In some examples, the one ormore of the units may be distinct circuit blocks (fixed-function orprogrammable), and in some examples, the one or more units may beintegrated circuits.

Video decoder 300 may include ALUs, EFUs, digital circuits, analogcircuits, and/or programmable cores formed from programmable circuits.In examples where the operations of video decoder 300 are performed bysoftware executing on the programmable circuits, on-chip or off-chipmemory may store instructions (e.g., object code) of the software thatvideo decoder 300 receives and executes.

Entropy decoding unit 302 may receive encoded video data from the CPBand may entropy decode the encoded video data to reproduce syntaxelements. Prediction processing unit 304, inverse quantization unit 306,inverse transform processing unit 308, reconstruction unit 310, andfilter unit 312 may generate decoded video data based on the syntaxelements extracted from the bitstream.

In general, video decoder 300 reconstructs a picture on a block-by-blockbasis. Video decoder 300 may perform a reconstruction operation on eachblock individually (where the block currently being reconstructed, i.e.,decoded, may be referred to as a “current block”).

Entropy decoding unit 302 may entropy decode syntax elements definingquantized coefficients of a quantized coefficient block, as well astransform information, such as a quantization parameter (QP) and/ortransform mode indication(s). Inverse quantization unit 306 may use theQP associated with the quantized coefficient block to determine a degreeof quantization and, likewise, a degree of inverse quantization forinverse quantization unit 306 to apply. Inverse quantization unit 306may, for example, perform a bitwise left-shift operation to inversequantize the quantized coefficients. Inverse quantization unit 306 maythereby form a coefficient block including coefficients.

After inverse quantization unit 306 forms the coefficient block, inversetransform processing unit 308 may apply one or more inverse transformsto the coefficient block to generate a residual block associated withthe current block. For example, inverse transform processing unit 308may apply an inverse DCT, an inverse integer transform, an inverseKarhunen-Loeve transform (KLT), an inverse rotational transform, aninverse directional transform, or another inverse transform to thecoefficient block. For blocks coded in a transform skip mode, inversetransform processing unit 308 may be viewed as a pass-through unit thatdoes not alter the dequantized coefficient block.

Furthermore, prediction processing unit 304 generates a prediction blockaccording to prediction information syntax elements that were entropydecoded by entropy decoding unit 302. For example, if the predictioninformation syntax elements indicate that the current block isinter-predicted, motion compensation unit 316 may generate theprediction block. In this case, the prediction information syntaxelements may indicate a reference picture in DPB 314 from which toretrieve a reference block, as well as a motion vector identifying alocation of the reference block in the reference picture relative to thelocation of the current block in the current picture. Motioncompensation unit 316 may generally perform the inter-prediction processin a manner that is substantially similar to that described with respectto motion compensation unit 224 (FIG. 3 ).

As another example, if the prediction information syntax elementsindicate that the current block is intra-predicted, intra-predictionunit 318 may generate the prediction block according to anintra-prediction mode indicated by the prediction information syntaxelements. Intra-prediction unit 318 may, for example, generate aprediction block using BDPCM and RDPCM as described above. Again,intra-prediction unit 318 may generally perform the intra-predictionprocess in a manner that is substantially similar to that described withrespect to intra-prediction unit 226 (FIG. 3 ). Intra-prediction unit318 may retrieve data of neighboring samples to the current block fromDPB 314.

Reconstruction unit 310 may reconstruct the current block using theprediction block and the residual block. For example, reconstructionunit 310 may add samples of the residual block to corresponding samplesof the prediction block to reconstruct the current block.

Filter unit 312 may perform one or more filter operations onreconstructed blocks. For example, filter unit 312 may performdeblocking operations to reduce blockiness artifacts along edges of thereconstructed blocks. Operations of filter unit 312 are not necessarilyperformed in all examples.

Video decoder 300 may store the reconstructed blocks in DPB 314. Asdiscussed above, DPB 314 may provide reference information, such assamples of a current picture for intra-prediction and previously decodedpictures for subsequent motion compensation, to prediction processingunit 304. Moreover, video decoder 300 may output decoded pictures fromDPB 314 for subsequent presentation on a display device, such as displaydevice 118 of FIG. 1 .

In this manner, video decoder 300 represents an example of a videodecoding device that includes a memory configured to store video dataand includes one or more processing units implemented in circuitry andconfigured to receive a syntax element indicating a maximum block sizeused for transform skip and determine a maximum size for a BDPCM orRDPCM mode based on the syntax element. In other examples, video decoder300 may receive a second syntax element separate from the first syntaxelement and determine a maximum size for a BDPCM or RDPCM mode based onthe second syntax element. In other examples, the maximum size for aBDPCM or RDPCM mode may be defined in a CODEC being executed by videodecoder 300.

In this manner, video decoder 300 represents an example of a videodecoding device that includes a memory configured to store video dataand includes one or more processing units implemented in circuitry andconfigured to receive a syntax element indicating a maximum block sizeused for transform skip and process the syntax element in accordancewith any technique described in this disclosure. Video decoder 300 may,for example, determine a maximum size for a BDPCM mode based on thesyntax element. To determine the maximum size for the BDPCM mode basedon the syntax element, video decoder 300 may, for instance, determinethe maximum size for the BDPCM mode to be equal to the maximum blocksize used for transform skip. As part of determining the maximum sizefor the BDPCM mode based on the syntax element, video decoder 300 mayreceive a difference value and determine the maximum size for the BDPCMmode based on the maximum block size used for transform skip and thedifference value. Video decoder 300 may, for example, receive the syntaxelement as part of an SPS, PPS, or slice header.

Video decoder 300 may additionally or alternatively be configured todetermine a maximum size for an RDPCM mode based on the syntax element.To determine the maximum size for the RDPCM mode based on the syntaxelement, video decoder 300 may determine the maximum size for the RDPCMmode to be equal to the maximum block size used for transform skip. Aspart of determining the maximum size for the RDPCM mode based on thesyntax element, video decoder 300 may, for example, receive a differencevalue and determine the maximum size for the RDPCM mode based on themaximum block size used for transform skip and the difference value.

In some instances, video decoder 300 may be configured to receive asecond syntax element separate from the first syntax element anddetermine a maximum size for a BDPCM mode based on the second syntaxelement. In some instances, video decoder 300 may be configured toreceive a second syntax element separate from the first syntax elementand determine a maximum size for a RDPCM mode based on the second syntaxelement. Video decoder 300 may also be configured to set a maximum sizefor a BDPCM mode to a value defined in a CODEC and/or set a maximum sizefor a RDPCM mode to a value defined in a CODEC.

Video decoder 300 may also be configured to determine the maximum blocksize used for transform skip and, based on the maximum block size usedfor transform skip, determine whether a RDPCM mode flag is present in abitstream that includes an encoded representation of the video data.Video decoder 300 may also be configured to determine the maximum blocksize used for transform skip and, based on the maximum block size usedfor transform skip, determine whether a BDPCM mode flag is present in abitstream that includes an encoded representation of the video data. Insome example, the BDPCM mode flag may specify a direction for the BDPCMmode. In other examples, the BDPCM mode flag may additionally oralternatively specify whether BDPCM mode is used for a specific block.

FIG. 5 is a flowchart illustrating an example method for encoding acurrent block. The current block may comprise a current CU. Althoughdescribed with respect to video encoder 200 (FIGS. 1 and 3 ), it shouldbe understood that other devices may be configured to perform a methodsimilar to that of FIG. 5 .

In this example, video encoder 200 initially predicts the current block(350). For example, video encoder 200 may form a prediction block forthe current block using BDPCM or RDPCM as discussed above. Video encoder200 may then calculate a residual block for the current block (352). Tocalculate the residual block, video encoder 200 may calculate adifference between the original, unencoded block and the predictionblock for the current block. Video encoder 200 may then transform and/orquantize coefficients of the residual block (354). Next, video encoder200 may scan the quantized coefficients of the residual block (356).During the scan, or following the scan, video encoder 200 may entropyencode the coefficients (358). For example, video encoder 200 may encodethe coefficients using CAVLC or CABAC. Video encoder 200 may then outputthe entropy encoded data of the block (360).

FIG. 6 is a flowchart illustrating an example method for decoding acurrent block of video data. The current block may comprise a currentCU. Although described with respect to video decoder 300 (FIGS. 1 and 4), it should be understood that other devices may be configured toperform a method similar to that of FIG. 6 .

Video decoder 300 may receive entropy encoded data for the currentblock, such as entropy encoded prediction information and entropyencoded data for coefficients of a residual block corresponding to thecurrent block (370). Video decoder 300 may entropy decode the entropyencoded data to determine prediction information for the current blockand to reproduce coefficients of the residual block (372). Video decoder300 may predict the current block (374), e.g., using an intra- orinter-prediction mode as indicated by the prediction information for thecurrent block, to calculate a prediction block for the current block.Video decoder 300 may, for example, predict the block using BDPCM orRDPCM as discussed above. Video decoder 300 may then inverse scan thereproduced coefficients (376), to create a block of quantizedcoefficients. Video decoder 300 may then inverse quantize and/or inversetransform the coefficients to produce a residual block (378). Videodecoder 300 may ultimately decode the current block by combining theprediction block and the residual block (380).

FIG. 7 is a flowchart illustrating an example method for encoding acurrent block. The current block may comprise a current CU. Althoughdescribed with respect to video encoder 200 (FIGS. 1 and 3 ), it shouldbe understood that other devices may be configured to perform a methodsimilar to that of FIG. 7 .

Video encoder 200 determines a maximum block size used for a transformskip mode (402). Video encoder 200 determines a maximum block size for aBDPCM mode based on the maximum block size used for the transform skipmode (404). To determine the maximum block size for the BDPCM mode,video encoder 200 may, for example, determine the maximum block size forthe BDPCM mode to be equal to the maximum block size used for thetransform skip mode. The BDPCM mode may, for example, be an RDPCM modeor other type of BDPCM mode. The value for the maximum block size forthe BDPCM mode may, for example, be one or both of a maximum block widthfor a block coded in the BDPCM mode or a maximum block height for ablock coded in the BDPCM mode.

Video encoder 200 encodes a block of video data based on the determinedmaximum block size for the BDPCM mode (406). As part of encoding theblock of video data, video encoder 200 may generate a syntax element(e.g., log2_transform_skip_max_size_minus2), for inclusion in a sequenceparameter set syntax structure of the video data, that indicates themaximum block size used for the transform skip mode. The syntax elementmay for example have a value equal to X, with X being an integer valuein a range of 0 to 3, inclusive. The maximum block size for the BDPCMmode may be equal to 1<<(X+2), with << representing a left shiftoperation.

As part of encoding the block of video data, video encoder 200 may alsodetermine whether to include a BDPCM mode flag, for the block, in abitstream of the encoded video data based on the maximum block size forthe transform skip mode. Video encoder 200 may, for example, include theBDPCM mode flag in the bitstream of encoded video data in response to asize for the block of video data being less than or equal to the maximumblock size for the BDPCM mode. Video encoder 200 may also output, forstorage or for transmission, the bitstream of encoded video data.

FIG. 8 is a flowchart illustrating an example method for decoding acurrent block of video data. The current block may comprise a currentCU. Although described with respect to video decoder 300 (FIGS. 1 and 4), it should be understood that other devices may be configured toperform a method similar to that of FIG. 8 .

Video decoder 300 receives a syntax element (e.g.,log2_transform_skip_max_size_minus2) indicating a maximum block size fora transform skip mode (410). The syntax element may, for example, bepart of an SPS.

Video decoder 300 determines a maximum block size for a BDPCM mode basedon the syntax element (412). The BDPCM mode may, for example, be anRDPCM mode or other type of BDPCM mode. The value for the maximum blocksize for the BDPCM mode may, for example, be one or both of a maximumblock width for a block coded in the BDPCM mode or a maximum blockheight for a block coded in the BDPCM mode.

To determine the maximum block size for the BDPCM mode based on thesyntax element, video decoder 300 may, for example, determine themaximum block size for the BDPCM mode to be equal to the maximum blocksize used for the transform skip mode. To determine the maximum blocksize for the BDPCM mode based on the syntax element, video decoder 300may, for example, determine the maximum block size for the BDPCM modebased on the syntax element by setting a value for the maximum blocksize for the BDPCM mode equal to 1<<(X+2), with << representing a leftshift operation and X representing an integer value in a range of 0 to 3inclusive.

Video decoder 300 decodes a block of video data based on the determinedmaximum block size for the BDPCM mode (414). As part of decoding theblock of video data, video decoder 300 may, for example, determine themaximum block size for the transform skip mode based on the syntaxelement and, based on the maximum block size for the transform skipmode, determine whether a BDPCM mode flag is present in a bitstream thatincludes an encoded representation of the video data. For instance,video decoder 300 may determine the BDPCM mode flag is present for theblock of video data in response to a size for the block of video databeing less than or equal to the maximum block size for the BDPCM mode.

It is to be recognized that depending on the example, certain acts orevents of any of the techniques described herein can be performed in adifferent sequence, may be added, merged, or left out altogether (e.g.,not all described acts or events are necessary for the practice of thetechniques). Moreover, in certain examples, acts or events may beperformed concurrently, e.g., through multi-threaded processing,interrupt processing, or multiple processors, rather than sequentially.

In one or more examples, the functions described may be implemented inhardware, software, firmware, or any combination thereof. If implementedin software, the functions may be stored on or transmitted over as oneor more instructions or code on a computer-readable medium and executedby a hardware-based processing unit. Computer-readable media may includecomputer-readable storage media, which corresponds to a tangible mediumsuch as data storage media, or communication media including any mediumthat facilitates transfer of a computer program from one place toanother, e.g., according to a communication protocol. In this manner,computer-readable media generally may correspond to (1) tangiblecomputer-readable storage media which is non-transitory or (2) acommunication medium such as a signal or carrier wave. Data storagemedia may be any available media that can be accessed by one or morecomputers or one or more processors to retrieve instructions, codeand/or data structures for implementation of the techniques described inthis disclosure. A computer program product may include acomputer-readable medium.

By way of example, and not limitation, such computer-readable storagemedia can comprise RAM, ROM, EEPROM, CD-ROM or other optical diskstorage, magnetic disk storage, or other magnetic storage devices, flashmemory, or any other medium that can be used to store desired programcode in the form of instructions or data structures and that can beaccessed by a computer. Also, any connection is properly termed acomputer-readable medium. For example, if instructions are transmittedfrom a website, server, or other remote source using a coaxial cable,fiber optic cable, twisted pair, digital subscriber line (DSL), orwireless technologies such as infrared, radio, and microwave, then thecoaxial cable, fiber optic cable, twisted pair, DSL, or wirelesstechnologies such as infrared, radio, and microwave are included in thedefinition of medium. It should be understood, however, thatcomputer-readable storage media and data storage media do not includeconnections, carrier waves, signals, or other transitory media, but areinstead directed to non-transitory, tangible storage media. Disk anddisc, as used herein, includes compact disc (CD), laser disc, opticaldisc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wheredisks usually reproduce data magnetically, while discs reproduce dataoptically with lasers. Combinations of the above should also be includedwithin the scope of computer-readable media.

Instructions may be executed by one or more processors, such as one ormore digital signal processors (DSPs), general purpose microprocessors,application specific integrated circuits (ASICs), field programmablegate arrays (FPGAs), or other equivalent integrated or discrete logiccircuitry. Accordingly, the terms “processor” and “processingcircuitry,” as used herein may refer to any of the foregoing structuresor any other structure suitable for implementation of the techniquesdescribed herein. In addition, in some aspects, the functionalitydescribed herein may be provided within dedicated hardware and/orsoftware modules configured for encoding and decoding, or incorporatedin a combined codec. Also, the techniques could be fully implemented inone or more circuits or logic elements.

The techniques of this disclosure may be implemented in a wide varietyof devices or apparatuses, including a wireless handset, an integratedcircuit (IC) or a set of ICs (e.g., a chip set). Various components,modules, or units are described in this disclosure to emphasizefunctional aspects of devices configured to perform the disclosedtechniques, but do not necessarily require realization by differenthardware units. Rather, as described above, various units may becombined in a codec hardware unit or provided by a collection ofinteroperative hardware units, including one or more processors asdescribed above, in conjunction with suitable software and/or firmware.

What is claimed is:
 1. A method of decoding video data, the methodcomprising: receiving, in a bitstream, a syntax element as part of asequence parameter set syntax structure for a picture, wherein thesyntax element indicates a maximum block size for both a transform skipmode and a block-based delta pulse code modulation (BDPCM) mode;determining a maximum block size for the BDPCM mode based on the syntaxelement, wherein the maximum block size is limited to a range of sizesfrom 4 to 32; determining the maximum block size for the transform skipmode based on the syntax element; and based on the determined maximumblock size for the transform skip mode, determining that a BDPCM modeflag is present in the bitstream for the first block in response to asize for the first block being less than or equal to the maximum blocksize for the BDPCM mode and decoding the BDPCM mode flag from thebitstream; determining that a first block of the picture is coded usingthe BDPCM mode based on the BDPCM mode flag; decoding the first blockbased on the determined maximum block size; determining that a secondblock of the picture is coded using the transform skip mode; decodingthe second block based on the determined maximum block size; andoutputting a decoded version of the picture.
 2. The method of claim 1,wherein determining the maximum block size for the BDPCM mode based onthe syntax element comprises determining the maximum block size for theBDPCM mode to be equal to the maximum block size used for the transformskip mode.
 3. The method of claim 1, wherein the syntax element has avalue equal to X, wherein X is an integer value in a range of 0 to 3inclusive, and wherein the maximum block size for the BDPCM mode isequal to 1<<(X+2), wherein << represents a left shift operation.
 4. Themethod of claim 3, wherein the maximum block size for the BDPCM modecomprises a maximum block width for the BDPCM mode.
 5. The method ofclaim 3, wherein the maximum block size for the BDPCM mode comprises amaximum block height for the BDPCM mode.
 6. The method of claim 1,wherein the BDPCM mode comprises a residual domain BDPCM (RDPCM) mode.7. A method of encoding video data, the method comprising: determining,for a first block of a picture, a maximum block size used for atransform skip mode, wherein the maximum block size is limited to arange of sizes from 4 to 32; determining, for a second block of thepicture, a maximum block size for a block-based delta pulse codemodulation (BDPCM) mode based on the maximum block size used for thetransform skip mode; based on the maximum block size for the transformskip mode, include a BDPCM mode flag in a bitstream of the encoded videodata in response to a size for the second block being less than or equalto the maximum block size for the BDPCM mode; and encoding the secondblock based on the determined maximum block size for the BDPCM mode,wherein encoding the second block based on the determined maximum blocksize for the BDPCM mode comprises generating, for inclusion in asequence parameter set syntax structure applying to the picture, asyntax element indicating the maximum block size used for both thetransform skip mode and the BDPCM mode.
 8. The method of claim 7,wherein determining the maximum block size for the BDPCM mode comprisesdetermining the maximum block size for the BDPCM mode to be equal to themaximum block size used for the transform skip mode.
 9. The method ofclaim 7, wherein the syntax element has a value equal to X, wherein X isan integer value in a range of 0 to 3 inclusive, and wherein the maximumblock size for the BDPCM mode is equal to 1<<(X+2), wherein <<represents a left shift operation.
 10. The method of claim 9, whereinthe maximum block size for the BDPCM mode comprises a maximum blockwidth for the BDPCM mode.
 11. The method of claim 9, wherein the maximumblock size for the BDPCM mode comprises a maximum block height for theBDPCM mode.
 12. The method of claim 7, wherein the BDPCM mode comprisesa residual domain BDPCM (RDPCM) mode.
 13. A device for decoding videodata, the device comprising: a memory configured to store video data;and one or more processors configured to: receive, in a bitstream, asyntax element as part of a sequence parameter set syntax structure fora picture, wherein the syntax element indicates a maximum block size forboth a transform skip mode and a block-based delta pulse code modulation(BDPCM) mode; determine a maximum block size for the BDPCM mode based onthe syntax element, wherein the maximum block size is limited to a rangeof sizes from 4 to 32; decode the first block based on the determinedmaximum block size; determine that a second block of the picture iscoded using the transform skip mode; decode the second block based onthe determined maximum block size; and output a decoded version of thepicture.
 14. The device of claim 13, wherein to determine the maximumblock size for the BDPCM mode based on the syntax element, the one ormore processors are further configured to determine the maximum blocksize for the BDPCM mode to be equal to the maximum block size used forthe transform skip mode.
 15. The device of claim 13, wherein the syntaxelement has a value equal to X, wherein X is an integer value in a rangeof 0 to 3 inclusive, and wherein the maximum block size for the BDPCMmode is equal to 1<<(X+2), wherein << represents a left shift operation.16. The device of claim 15, wherein the maximum block size for the BDPCMmode comprises a maximum block width for the BDPCM mode.
 17. The deviceof claim 15, wherein the maximum block size for the BDPCM mode comprisesa maximum block height for the BDPCM mode.
 18. The device of claim 13,wherein the BDPCM mode comprises a residual domain BDPCM (RDPCM) mode.19. The device of claim 13, wherein the device comprises a wirelesscommunication device, further comprising at least one of a receiverconfigured to receive an encoded representation of the video data or adisplay configured to display a decoded version of the picture.
 20. Thedevice of claim 19, wherein the wireless communication device comprisesa telephone handset and wherein the receiver is configured todemodulate, according to a wireless communication standard, a signalcomprising the encoded representation of the video data.
 21. A devicefor encoding video data, the device comprising: a memory configured tostore video data; and one or more processors configured to: determine,for a first block of a picture, a maximum block size used for atransform skip mode, wherein the maximum block size is limited to arange of sizes from 4 to 32; determine, for a second block of thepicture, a maximum block size for a block-based delta pulse codemodulation (BDPCM) mode based on the maximum block size used for thetransform skip mode; based on the maximum block size for the transformskip mode, include a BDPCM mode flag in a bitstream of the encoded videodata in response to a size for the second block being less than or equalto the maximum block size for the BDPCM mode; and encode, into thebitstream, the second block based on the determined maximum block sizefor the BDPCM mode, wherein encoding the second block based on thedetermined maximum block size for the BDPCM mode comprises generating,for inclusion in a sequence parameter set syntax structure applying tothe picture, a syntax element indicating the maximum block size used forboth the transform skip mode and the BDPCM mode.
 22. The device of claim21, wherein to determine the maximum block size for the BDPCM mode, theone or more processors are further configured to determine the maximumblock size for the BDPCM mode to be equal to the maximum block size usedfor the transform skip mode.
 23. The device of claim 21, wherein thesyntax element has a value equal to X, wherein X is an integer value ina range of 0 to 3 inclusive, and wherein the maximum block size for theBDPCM mode is equal to 1<<(X+2), wherein << represents a left shiftoperation.
 24. The device of claim 23, wherein the maximum block sizefor the BDPCM mode comprises a maximum block width for the BDPCM mode.25. The device of claim 23, wherein the maximum block size for the BDPCMmode comprises a maximum block height for the BDPCM mode.
 26. The deviceof claim 21, wherein the BDPCM mode comprises a residual domain BDPCM(RDPCM) mode.
 27. The device of claim 21, further comprising: a cameraconfigured to capture the video data.
 28. A non-transitorycomputer-readable storage medium storing instructions that when executedby one or more processors cause the one or more processor to: receive,in a bitstream, a syntax element as part of a sequence parameter setsyntax structure for a picture, wherein the syntax element indicates amaximum block size for both a transform skip mode and a block-baseddelta pulse code modulation (BDPCM) mode; determine a maximum block sizefor the BDPCM mode based on the syntax element, wherein the maximumblock size is limited to a range of sizes from 4 to 32; determine themaximum block size for the transform skip mode based on the syntaxelement; and based on the determined maximum block size for thetransform skip mode, determine that a BDPCM mode flag is present in thebitstream for the first block in response to a size for the first blockbeing less than or equal to the maximum block size for the BDPCM modeand determine the BDPCM mode flag from the bitstream; determine that afirst block of the picture is coded using the BDPCM mode based on theBDPCM mode flag; decode the first block based on the determined maximumblock size; determine that a second block of the picture is coded usingthe transform skip mode; decode the second block based on the determinedmaximum block size; and output a decoded version of the picture.
 29. Anapparatus for decoding video data, the apparatus comprising: means forreceiving, in a bitstream, a syntax element as part of a sequenceparameter set syntax structure for a picture, wherein the syntax elementindicates a maximum block size for both a transform skip mode and ablock-based delta pulse code modulation (BDPCM) mode; means fordetermining a maximum block size for the BDPCM mode based on the syntaxelement, wherein the maximum block size is limited to a range of sizesfrom 4 to 32; means for determining the maximum block size for thetransform skip mode based on the syntax element; and means for, based onthe determined maximum block size for the transform skip mode,determining that a BDPCM mode flag is present in the bitstream for thefirst block in response to a size for the first block being less than orequal to the maximum block size for the BDPCM mode and means fordecoding the BDPCM mode flag from the bitstream; means for determiningthat a first block of the picture is coded using the BDPCM mode; meansfor decoding the first block based on the determined maximum block size;means for determining that a second block of the picture is coded usingthe transform skip mode; means for decoding the second block based onthe determined maximum block size; and means for outputting a decodedversion of the picture.